/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sge.Entidades;

/**
 *
 * @author victor
 */
public class EventoMaterial {

    protected EventoMaterialPK eventoMaterialPK;
    private int cantidad;
    private Material material;
    private Evento evento;

    public EventoMaterial() {
    }

    public EventoMaterial(EventoMaterialPK eventoMaterialPK) {
        this.eventoMaterialPK = eventoMaterialPK;
    }

    public EventoMaterial(EventoMaterialPK eventoMaterialPK, int cantidad) {
        this.eventoMaterialPK = eventoMaterialPK;
        this.cantidad = cantidad;
    }

    public EventoMaterial(int eventoIdEvento, int materialIdMaterial) {
        this.eventoMaterialPK = new EventoMaterialPK(eventoIdEvento, materialIdMaterial);
    }

    public EventoMaterialPK getEventoMaterialPK() {
        return eventoMaterialPK;
    }

    public void setEventoMaterialPK(EventoMaterialPK eventoMaterialPK) {
        this.eventoMaterialPK = eventoMaterialPK;
    }

    public int getCantidad() {
        return cantidad;
    }

    public void setCantidad(int cantidad) {
        this.cantidad = cantidad;
    }

    public Material getMaterial() {
        return material;
    }

    public void setMaterial(Material material) {
        this.material = material;
    }

    public Evento getEvento() {
        return evento;
    }

    public void setEvento(Evento evento) {
        this.evento = evento;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (eventoMaterialPK != null ? eventoMaterialPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof EventoMaterial)) {
            return false;
        }
        EventoMaterial other = (EventoMaterial) object;
        if ((this.eventoMaterialPK == null && other.eventoMaterialPK != null) || (this.eventoMaterialPK != null && !this.eventoMaterialPK.equals(other.eventoMaterialPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sge.Entidades.EventoMaterial[ eventoMaterialPK=" + eventoMaterialPK + " ]";
    }
}
